package com.hsxshop.model;

import com.sun.istack.internal.Nullable;
import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
import org.springframework.web.bind.annotation.Mapping;

import javax.persistence.*;

/**
 * Created by wangchongya on 17/7/12.
 */
@Entity
@Table( name = "nhsx_intention" )
public class Intention {
    private int id;
    private int userId;
    private String createTime;
    private String endTime;
    private int state;
    private int supplyId;
    private int demandId;
    private int storage;
    private int type;
    private String trace;
    private String remark;
    private int displayType;

    private String userPhone;
    public Intention(){}

    public Intention(int id, int userId, String createTime, String endTime, int state, int supplyId, int demandId, int storage, int type, String trace, String remark,int displayType) {
        this.id = id;
        this.userId = userId;
        this.createTime = createTime;
        this.endTime = endTime;
        this.state = state;
        this.supplyId = supplyId;
        this.demandId = demandId;
        this.storage = storage;
        this.type = type;
        this.trace = trace;
        this.remark = remark;
        this.displayType=displayType;
    }

    @Id
    @GeneratedValue(generator="increment")
    @GenericGenerator(name="increment", strategy = "increment")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }


    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public int getSupplyId() {
        return supplyId;
    }

    public void setSupplyId(int supplyId) {
        this.supplyId = supplyId;
    }

    public int getDemandId() {
        return demandId;
    }

    public void setDemandId(int demandId) {
        this.demandId = demandId;
    }

    public int getStorage() {
        return storage;
    }

    public void setStorage(int storage) {
        this.storage = storage;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getTrace() {
        return trace;
    }

    public void setTrace(String trace) {
        this.trace = trace;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public int getDisplayType() {
        return displayType;
    }

    public void setDisplayType(int displayType) {
        this.displayType = displayType;
    }

    @Transient
    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }
}
